<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我要分享</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="stylesheet" type="text/css" href="__ROOT__/public/webapp/css/s_base.css" />
		<style type="text/css">
			body{
				background: #6a9ef2;
			}
			.share_top{
				margin-top: 50px;
				text-align: center;
			}
			.share_top  p{
				color: #fff;
				margin-top: 8px;
			}
			.avatar{
				width: 70px;
				height: 70px;
				border-radius: 70px;
				border: 2px solid #a6c4f2;
			}
			.share_btn{
				width: 130px;
				margin-top: 30px;
			}
			.list_wrap{
				width: 94%;
				padding: 0px 2%;
				margin: 20px auto 0px;
				
			}
			.friend_title{
				color: #fff;
				margin-bottom: 15px;
			}
			.list_cell{
				background: rgba(255,255,255,0.3);
				color: #fff;
				height: 80px;
				line-height: 80px;
				margin-bottom: 8px;
			}
			.friend_avatar{
				width: 60px;
				height: 60px;
				border-radius: 60px;
				margin: 10px 0px;
			}
			.friend_info{
				width: 50%;
				overflow: hidden;
				height: 100%;
			}
			.friend_info .left{
				margin-left: 10px;
			}
		
			.list_cell .right{
				width: 42%;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
			.time{
				margin-left: 6px;
			}
			.friend_name{
				width: calc(100% - 80px);
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
			
		</style>
	</head>
	<body>
		<div class="share_top">
			<img src="{$v['headimg']}" class="avatar"/>
			<p>{$v['name']}</p>
			<a href="{:U('Wechat/Mine/fenxiang',['openiv'=>$_SESSION['wechatopenid']])}"><img src="__ROOT__/public/webapp/img/share.png" class="share_btn"/></a>
		</div>
		<if condition="$f neq NULL">
		<div class="list_wrap">
			<p class="friend_title">我的好友</p>
			<php>foreach($f as $k => $p){</php>
			<div class="list_cell clearfix">
				<div class="left friend_info clearfix">
					<img src="<?php echo $p['headimg'] ?>" class="friend_avatar left"/>
					<span class="friend_name left"><?php echo $p['name'] ?></span>
				</div>
				<div class="right">
					<?php 
						$time = $p['time'];
						$time = substr($time,0,-5);
						$time = str_replace('年','-',$time);
						$time = str_replace('月','-',$time);
						$time = str_replace('日',' ',$time);
					?>
					<span><?php echo $time ?></span>
				</div>
			</div>
			<php>}</php>
		</div>
			<else/>
			<div class="list_wrap">
				<p class="friend_title">我的好友</p>
				<p class="no_friend friend_title" style="text-align: center;">暂无匹配数据</p>
			</div>
		</if>
	</body>
</html>
